﻿#pragma once
#ifndef __CINIT_H__
#define __CINIT_H__

#include <Windows.h>
#include <d3d9.h>
#include "CAudio.h"

class CInit
{
private:
	LPCSTR m_Name;

	int	 m_ScreenWidth;
	int	 m_ScreenHeight;
	bool m_IsFullScreen;

protected: 
	HINSTANCE hInstance;
	HWND wndHandle;  

	LPDIRECT3D9		  _pd3d;	
	LPDIRECT3DDEVICE9 _pd3dDevice; 

public:
	CInit(HWND hWnd, HINSTANCE hInstance, LPCSTR Name, int Width, int Height, bool IsFullScreen);
	~CInit();

	bool initWindow(int nShowCmd);
	bool initDirect3D();
	bool initSound();
	void render();
	static LRESULT CALLBACK _WinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
};

#endif